var gridStore = new Ext.data.Store({
		proxy: new Ext.data.HttpProxy({
		url: "../room/roomProject!getAllProject.action",
		method: "POST"
	}),
	reader: new Ext.data.JsonReader({
		fields: ["id", "bizNumber", "name", "address","telphone","lon","lat","siteNumber","siteName",
					"newCreate","relatedCode","mainSignal","liftSignal","liftNumber","liftTopFloor","underParkSignal",
					"underParkNumber","underParkCarNumber","resolveMethod","coverArea","emergencyLevel","netType",
					"resolveContent","buildType","gsmSiteNumber","gsmBuildType","gsmBsc","gsmTerm","tdSiteNumber",
					"tdBuildType","tdRnc","tdTerm","wlanSiteNumber","wlanBuildType","wlanAc","wlanTerm","lteSiteNumber",
					"lteBuildType","lteBsc","lteTerm","repeaterMaterial","repeaterBuildCost","repeaterBuildFactory",
					"horsePowerSuit","repeaterBudgetTotal","zywNumber","practicalEarly","siteAddress",
					"needCivil","civilCost","civilBuildUnit","bodyCareType","bodyCareFactory","bodyCareCost","newTransfer",
					"workMenuNumberOne","workMenuNumberTwo","addressCode","investDispatchOrder","transferProjectName",
					"transferProjectNumber","transferMisNumber","transferProjectBelong","transferBuildScale","transferBudget","transferOwnerMaterial",
					"transferMaterial","allTransferMaterialCost","wirePileLineNumber","wireDeviceNumber","wireLineMisCode",
					"wireDeviceMisCode","transferMaterialCost","fgysBuildConst","fgysBudgetTotal","fgysBuildUnit","itemFinishedTime",
					"transferDesigner","transferConstructionUnit","transferSupervisorUnit","transferStartDate","transferPlanCompleteDate",
					"transferStartApplyDate","transferRemark","investBelong","civilInvestBelong","bodyCareInvestBelong","fgysInvestBelong",
					"repeaterInvestBelong","costBelong","replyDate","fgysMisCode","repeaterMisCode","horsePowerMisCode","unitName","areaId",
					"areaTypeId","projectTypeId","assigners","closeTime"], 
		root: "rows", 
		id: "id",
		totalProperty: "total"
	})
}); 
var searchForm = {
	id:'fgys-search-form',
	xtype:'searchform',
	store:gridStore,
	modal:false,
	bind:true,
	width:522,
	height:350,
	layout:'column',
	labelWidth:110,
	labelAlign:'right',
	bodyStyle:'padding:2px',
	defaults:{
		border:false
	},
	url:'../room/roomProject!getAllProject.action',
	items:[{
		columnWidth : .5,
		layout : 'form',
		bodyStyle : 'padding-right:2px;',
		border:false,
		defaults : {
			border:false,
			xtype : 'textfield',
			anchor : '100%'
		},
		items:[{
			name: "rpt.bizNumber",
			fieldLabel:'项目编号'
		},{
			name:'rpt.address',
			fieldLabel:'地址'
		},{
			name:'rpt.lon',
			fieldLabel:'经度'
		},{
			xtype:'combo',
			fieldLabel:'所属区域',
			readOnly : true,
			editable : false,
			mode:'local',
			triggerAction : 'all',
			hiddenName:'rpt.areaId',
			valueField : 'rpt.areaId',
			displayField : 'areaText',
			store:new Ext.data.SimpleStore({
				fields:['rpt.areaId','areaText'],
				data:[
					['2','西湖'],
					['3','江干'],
					['4','武林'],
					['5','拱墅'],
					['6','滨江'],
					['7','下沙'],
					['8','余杭'],
					['9','富阳'],
					['10','萧山'],
					['11','桐庐'],
					['12','建德'],
					['13','淳安'],
					['14','临安']
				]
			}),
			emptyText:'请选择所属区域...'
		},{
			xtype:'combo',
			fieldLabel:'项目分类',
			readOnly : true,
			editable : false,
			mode:'local',
			triggerAction : 'all',
			hiddenName:'rpt.projectTypeId',
			valueField : 'rpt.projectTypeId',
			displayField : 'projectText',
			store:new Ext.data.SimpleStore({
				fields:['rpt.projectTypeId','projectText'],
				data:[
					['16','解决VIP投诉'],
					['17','新区跟进'],
					['18','话务吸收'],
					['19','深度覆盖'],
					['20','解决普通投诉'],
					['21','解决弱覆盖'],
					['22','解决质差问题'],
					['23','道路覆盖'],
					['24','解决高层投诉']
				]
			}),
			emptyText:'请选择项目分类...'
		},{
			xtype:'combo',
			fieldLabel:'项目进度',
			readOnly : true,
			editable : false,
			mode:'local',
			triggerAction : 'all',
			hiddenName:'rpt.unitName',
			valueField : 'rpt.unitName',
			displayField : 'Text',
			store:new Ext.data.SimpleStore({
				fields:['rpt.unitName','Text'],
				data:[
					['投诉需求确认','投诉需求确认'],
					['前期摸排测试','前期摸排测试'],
					['网络部审核','网络部审核'],
					['分公司确认','分公司确认'],
					['网络部站号站名分配','网络部站号站名分配'],
					['工程部立项','工程部立项'],
					['覆盖延伸方案设计','覆盖延伸方案设计'],
					['覆盖延伸方案审核','覆盖延伸方案审核'],
					['覆盖延伸方案续审','覆盖延伸方案续审'],
					['传输方案设计','传输方案设计'],
					['传输方案审核','传输方案审核'],
					['传输施工审核','传输施工审核'],
					['提交土建图纸','提交土建图纸'],
					['开工申请','开工申请'],
					['开工批复','开工批复'],
					['开工确认','开工确认'],
					['传输开工申请(分公司)','传输开工申请(分公司)'],
					['传输开工申请(有线室)','传输开工申请(有线室)'],
					['传输开工批复','传输开工批复'],
					['传输物资配送','传输物资配送'],
					['传输物资到货','传输物资到货'],
					['传输施工完工(分公司)','传输施工完工(分公司)'],
					['土建施工','土建施工'],
					['土建完工','土建完工'],
					['布线与设备施工','布线与设备施工'],
					['布线与设备完工','布线与设备完工'],
					['分制式站点开通','分制式站点开通'],
					['GSM制式开通','GSM制式开通'],
					['TD制式开通','TD制式开通'],
					['WLAN制式开通','WLAN制式开通'],
					['LTE制式开通','LTE制式开通'],
					['网络部分制式审核','网络部分制式审核'],
					['工程部提交验收','工程部提交验收'],
					['完工验收','完工验收'],
					['维护优化','维护优化'],
					['传输施工完工(有线室)','传输施工完工(有线室)'],
					['土建施工分公司','土建施工分公司'],
					['土建完工分公司','土建完工分公司']
				]
			}),
			emptyText:'请选择项目进度 ...'
		},{
			xtype:'combo',
			hiddenName:'rpt.mainSignal',
			valueField:'rpt.mainSignal',
			displayField:'ztxxDisplay',
			fieldLabel:'主体信息',
			readOnly : true,
			editable : false,
			mode:'local',
			triggerAction : 'all',
			store:new Ext.data.SimpleStore({
				fields:['rpt.mainSignal','ztxxDisplay'],
				data:[['覆盖良好','覆盖良好'],['无覆盖','无覆盖'],['弱覆盖','弱覆盖'],['部分无覆盖','部分无覆盖'],['部分弱覆盖','部分弱覆盖'],['覆盖一般','覆盖一般']]
			}),
			emptyText:'请选择主体信息...'
		},{
			xtype: "numberfield",
            name: "rpt.liftNumber",
            fieldLabel:'电梯数量',
            allowNegative:false,
            allowDecimals:false,
            minValue:0
		},{
			xtype:'combo',
			fieldLabel:'地下车库信号',
			hiddenName:'rpt.underParkSignal',
			valueField:'rpt.underParkSignal',
			displayField:'dxckxhDisplay',
			readOnly : true,
			editable : false,
			mode:'local',
			triggerAction : 'all',
			store:new Ext.data.SimpleStore({
				fields:['rpt.underParkSignal','dxckxhDisplay'],
				data:[['覆盖良好','覆盖良好'],['无覆盖','无覆盖'],['弱覆盖','弱覆盖'],['部分弱覆盖','部分弱覆盖'],['覆盖一般','覆盖一般']]
			}),
			emptyText:'请选择地下车库信号...'
		},{
			xtype: "numberfield",
			fieldLabel:'预计覆盖面积(㎡)',
            name: "rpt.coverArea",
            allowNegative:false,
            minValue:0
		},{
			xtype:'lovcombo',
			fieldLabel:'网络制式',
			hiddenName:'rpt.netType',
			valueField:'rpt.netType',
			displayField:'netTypeText',
			readOnly : true,
			editable : false,
			mode:'local',
			triggerAction : 'all',
			store:new Ext.data.SimpleStore({
				fields:['rpt.netType','netTypeText'],
				data:[['GSM','GSM'],
				      ['TD','TD'],
				      ['LTE','LTE'],
				      ['WLAN','WLAN']]
			}),
			emptyText:'请选择网络制式...'
		},{
			id:'status',
			xtype:'hidden',
			name:'status',
			value:''
		}]
	},{
		columnWidth : .5,
		layout : 'form',
		bodyStyle : 'padding-left:5px;',
		border:false,
		defaults : {
			border:false,
			xtype : 'textfield',
			anchor : '100%'
		},
		items:[{
			name:'rpt.name',
			fieldLabel:'项目名称'
		},{
			name:'rpt.telphone',
			fieldLabel:'电话'
		},{
			name:'rpt.lat',
			fieldLabel:'纬度'
		},{
			xtype:'combo',
			fieldLabel:'区域性质',
			readOnly : true,
			editable : false,
			mode:'local',
			triggerAction : 'all',
			hiddenName:'rpt.areaTypeId',
			valueField : 'rpt.areaTypeId',
			displayField : 'areaTypeText',
			store:new Ext.data.SimpleStore({
				fields:['rpt.areaTypeId','areaTypeText'],
				data:[
					['26','普通小高层小区'],
					['27','高档小高层小区'],
					['28','普通高层小区'],
					['29','高档高层小区'],
					['30','大型商场'],
					['31','中型商场'],
					['32','小型商场'],
					['33','室外商业街区'],
					['34','大型办公楼'],
					['35','中型办公楼'],
					['36','普通办公楼'],
					['37','小型办公楼'],
					['38','五星级宾馆'],
					['39','四星级宾馆'],
					['40','三星级宾馆'],
					['41','二星级及以下宾馆'],
					['42','娱乐休闲场所'],
					['43','地下空间休闲场所'],
					['44','餐饮场所'],
					['45','农居点'],
					['46','工业园区'],
					['47','校园'],
					['48','隧道'],
					['49','景区'],
					['50','大型桥梁'],
					['51','干扰区域'],
					['52','行政村'],
					['53','自然村'],
					['54','车站码头'],
					['55','专业市场'],
					['56','多层'],
					['57','电梯'],
					['58','其他营业场所'],
					['59','其他地下场所'],
					['60','无需覆盖区域'],
					['61','普通道路'],
					['62','大型医院'],
					['63','小型医院'],
					['64','中型医院'],
					['65','二级甲等以上'],
					['66','二级甲等以下'],
					['67','其它']
				]
			}),
			emptyText:'请选择区域性质...'
		},{
			xtype:'combo',
			hiddenName:'rpt.emergencyLevel',
			fieldLabel:'紧急程度',
			readOnly : true,
			editable : false,
			mode:'local',
			triggerAction : 'all',
			valueField : 'rpt.emergencyLevel',
			displayField : 'jjDisplay',
			store: new Ext.data.SimpleStore({
				fields:['rpt.emergencyLevel','jjDisplay'],
				data:[['可缓','可缓'],['一般','一般'],['紧急','紧急']]
			}),
			emptyText:'请选择紧急程度...'
		},{
			xtype:'combo',
			hiddenName:'rpt.liftSignal',
			fieldLabel:'电梯信号',
			readOnly : true,
			editable : false,
			mode:'local',
			triggerAction : 'all',
			valueField : 'rpt.liftSignal',
			displayField : 'dtxhDisplay',
			store: new Ext.data.SimpleStore({
				fields:['rpt.liftSignal','dtxhDisplay'],
				data:[['覆盖良好','覆盖良好'],['无覆盖','无覆盖'],['弱覆盖','弱覆盖'],['部分无覆盖','部分无覆盖'],['部分弱覆盖','部分弱覆盖'],['覆盖一般','覆盖一般']]
			}),
			emptyText:'请选择电梯信号...'
		},{
			xtype:'lovcombo',
			hiddenName:'rpt.resolveContent',
			fieldLabel:'解决内容',
			valueField:'rpt.resolveContent',
			displayField:'jjnrDisplay',
			readOnly : false,
			editable : true,
			mode:'local',
			triggerAction : 'all',
			store:new Ext.data.SimpleStore({
				fields:['rpt.resolveContent','jjnrDisplay'],
				data:[
					['主体','主体'],
					['电梯','电梯'],
					['地下室','地下室'],
					['分布+外挂','分布+外挂'],
					['小区分布','小区分布']
				]
			}),
			emptyText:'请选择解决内容...'
		},{
			xtype: "numberfield",
            name: "rpt.liftTopFloor",
            fieldLabel:'电梯最高层数',
            allowNegative:false,
            allowDecimals:false,
            minValue:0
		},{
			xtype: "numberfield",
            name: "rpt.underParkNumber",
            allowNegative:false,
            allowDecimals:false,
            minValue:0,
            fieldLabel:'独立地下车库数量'
		},{
			xtype: "numberfield",
            name: "rpt.underParkCarNumber",
            allowNegative:false,
            allowDecimals:false,
            minValue:0,
            fieldLabel:'地下车库车位数量'
		},{
			xtype:'textfield',
			name:'rpt.siteName',
			fieldLabel:'站名'
		}]
	}]
};
var fgysMenu = new Ext.menu.Menu({
	id: "fgys-menu-export",
	listeners : {
		click : function() {
			this.hide();
		}
	},
	items: [{
		/*text: '导出当前页',
		iconCls:'xls',
	    handler: function() {
	        var vExportContent = grid.getExcelXml();
	        if (Ext.isIE6 || Ext.isIE7 || Ext.isIE8 || Ext.isSafari || Ext.isSafari2 || Ext.isSafari3) {
	            var fd=Ext.get('frmDummy');
	            if (!fd) {
	                fd=Ext.DomHelper.append(Ext.getBody(),{tag:'form',method:'post',id:'frmDummy',action:'exportexcel.jsp', target:'_blank',name:'frmDummy',cls:'x-hidden',cn:[
	                    {tag:'input',name:'exportContent',id:'exportContent',type:'hidden'}
	                ]},true);
	            }
	            fd.child('#exportContent').set({value:vExportContent});
	            fd.dom.submit();
	        } else {
	            document.location = 'data:application/vnd.ms-excel;base64,'+Base64.encode(vExportContent);
	    }}*/
	},{
		text: '导出所有',
		iconCls:'xls',
		handler: function(){
			var params="export=export&limit=30000";
			if(gridStore.baseParams!='null'){
				params += "&"+Ext.urlEncode(gridStore.baseParams);
			}
			
			window.open("../room/roomProject!getAllProject.action?"+params);
		}
	}]
});	
var searchMenu = new Ext.menu.Menu({
	id:"fgys-menu-search",
	listeners:{
		click:function(){
			this.hide();
		}
	},
	items:[{
		text:'清除条件查询',
		iconCls:'delete',
		handler:function(){
			var params=grid.getStore().baseParams;
			var searchform=Ext.getCmp('fgys-search-form');
			if(params['rpt.name']){
				grid.getStore().baseParams['rpt.name']=null;
			}
			if(params['rpt.bizNumber']){
				grid.getStore().baseParams['rpt.bizNumber']=null;
			}
			if(params['rpt.siteName']){
				grid.getStore().baseParams['rpt.siteName']=null;
			}
			if(params['rpt.areaId']){
				grid.getStore().baseParams['rpt.areaId']=null;
			}
			grid.getStore().reload();
			if(searchform){
				searchform.reset();
			}
			
		}
	},{
		text:'组合条件查询',
		iconCls:'detail',
		handler:function(){
			var searchWin = new Ext.Window({
				title:'组合条件查询',
				width:550,
				height:350,
				autoScroll: true,
				resizable:true,
				items:searchForm,
				buttonAlign:'center', 
				buttons:[{
					text:'查询',
					handler:function(form,action){
						var searchform=Ext.getCmp('fgys-search-form');
						if(searchform){
							//注意，这个提交方法不是向后台提交数据而是把表单填写的数据拼到store.baseparams中
							searchform.submit();
							searchWin.hide();
						}
					}
				},{
					text:'重置',
					handler:function(form,action){
						var searchform=Ext.getCmp('fgys-search-form');
						if(searchform)
						searchform.reset();
					}
				}]
			});
			searchWin.show();
		}
	}]
});
var recordStart = 0;
var grid = new Ext.grid.GridPanel({
	id: "grid",
	region: "center",
	autoScroll: true,
	margins: "4, 4, 4, 4",
	stripeRows: true,
	enableColumnHide: true,
	columnLines :true,// 增加表格竖线
	store: gridStore,
	loadMask: true,
	sm:new Ext.grid.RowSelectionModel({singeSelect:true}),
	columns: [
		new　Ext.grid.RowNumberer({
			header: "序号",
			width: 40,
			renderer: function(value, metaData, record, rowIndex) {
				return　recordStart + 1　+　rowIndex;
			}
		}), {
			header: "项目编号",
			dataIndex: "bizNumber",
			sortable: true,
			align: "center",
			width:140
		}, {
			header: "项目名称",
			dataIndex: "name",
			align: "center",
			width:200
		}, {
			header:"所属区域",
			dataIndex:"areaId",
			sortable: true,
			align:"center"
		},{
			header:"区域性质",
			dataIndex:"areaTypeId",
			align:"center"
		},{
			header:"项目分类",
			dataIndex:"projectTypeId",
			align:"center"
		}, {
			header:"项目进度",
			dataIndex:"unitName",
			align:"center",
			width:120
		}, {
			header:"任务处理人",
			dataIndex:"assigners",
			align:"center",
			width:200
		}, {
			header: "地址",
			dataIndex: "address",
			align: "center",
			width:200
		}, {
			header:"联系电话",
			dataIndex:"telphone",
			align: "center"
		},{
			header:"经度",
			dataIndex:"lon",
			align: "center"
		},{
			header:"纬度",
			dataIndex:"lat",
			align: "center"
		},{
			header:"站号",
			dataIndex:"siteNumber",
			sortable: true,
			align: "center"
		},{
			header:"站名",
			dataIndex:"siteName",
			align: "center"
		},{
			header:"是否新建",
			dataIndex:"newCreate",
			align: "center"
		},{
			header:"关联编码",
			dataIndex:"relatedCode",
			align: "center"
		},{
			header:"主体信号",
			dataIndex:"mainSignal",
			align: "center"
		},{
			header:"电梯信号",
			dataIndex:"liftSignal",
			align: "center"
		},{
			header:"电梯数量",
			dataIndex:"liftNumber",
			sortable: true,
			align: "center"
		},{
			header:"电梯最高层数",
			dataIndex:"liftTopFloor",
			align: "center"
		},{
			header:"地下车库信号",
			dataIndex:"underParkSignal",
			align: "center"
		},{
			header:"独立地下车库数量",
			dataIndex:"underParkNumber",
			align: "center",
			width:120
		},{
			header:"地下车库车位数量",
			dataIndex:"underParkCarNumber",
			align: "center",
			width:120
		},{
			header:"解决手段",
			dataIndex:"resolveMethod",
			align:"center"
		},{
			header:"预计覆盖面积(m²)",
			dataIndex:"coverArea",
			sortable: true,
			align:"center",
			width:120
		},{
			header:"紧急程度",
			dataIndex:"emergencyLevel",
			align:"center"
		},{
			header:"网络类型",
			dataIndex:"netType",
			sortable: true,
			align:"center"
		},{
			header:"解决内容",
			dataIndex:"resolveContent",
			align:"center"
		},{
			header:"建设类型",
			dataIndex:"buildType",
			align:"center"
		},{
			header:"GSM站号",
			dataIndex:"gsmSiteNumber",
			align:"center"
		},{
			header:"GSM建设类型",
			dataIndex:"gsmBuildType",
			align:"center"
		},{
			header:"GSM-BSC",
			dataIndex:"gsmBsc",
			align:"center"
		},{
			header:"GSM期数",
			dataIndex:"gsmTerm",
			align:"center"
		},{
			header:"TD站号",
			dataIndex:"tdSiteNumber",
			align:"center"
		},{
			header:"TD建设类型",
			dataIndex:"tdBuildType",
			align:"center"
		},{
			header:"TD-RNC",
			dataIndex:"tdRnc",
			align:"center"
		},{
			header:"TD期数",
			dataIndex:"tdTerm",
			align:"center"
		},{
			header:"WLAN站号",
			dataIndex:"wlanSiteNumber",
			align:"center"
		},{
			header:"WLAN建设类型",
			dataIndex:"wlanBuildType",
			align:"center"
		},{
			header:"WLAN-AC",
			dataIndex:"wlanAc",
			align:"center"
		},{
			header:"WLAN期数",
			dataIndex:"wlanTerm",
			align:"center"
		},{
			header:"LTE站号",
			dataIndex:"lteSiteNumber",
			align:"center"
		},{
			header:"LTE建设类型",
			dataIndex:"lteBuildType",
			align:"center"
		},{
			header:"LTE-BSC",
			dataIndex:"lteBsc",
			align:"center"
		},{
			header:"LTE期数",
			dataIndex:"lteTerm",
			align:"center"
		},{
			header:"直放站材料",
			dataIndex:"repeaterMaterial",
			align:"center"
		},{
			header:"直放站施工费用",
			dataIndex:"repeaterBuildCost",
			sortable: true,
			align:"center"
		},{
			header:"直放站施工厂家",
			dataIndex:"repeaterBuildFactory",
			align:"center"
		},{
			header:"动力配套",
			dataIndex:"horsePowerSuit",
			align:"center",
			renderer:function(value,cell,record,rowIndex,columnIndex,store){
			if(value=="true"){
					return "是";
				}else{
					return "否"
				}
			}
		},{
			header:"直放站预算总金额",
			dataIndex:"repeaterBudgetTotal",
			sortable: true,
			align:"center",
			width:120
		},{
			header:"开工申请",
			dataIndex:"zywNumber",
			align:"center"
		},{
			header:"前期落实",
			dataIndex:"practicalEarly",
			align:"center",
			renderer:function(value,cell,record,rowIndex,columnIndex,store){
				if(value=="true"){
					return "是";
				}else{
					return "否"
				}
			}
		},{
			header:"基站地址",
			dataIndex:"siteAddress",
			align:"center"
		},{
			header:"是否土建",
			dataIndex:"needCivil",
			align:"center",
			renderer:function(value,cell,record,rowIndex,columnIndex,store){
				if(value=="true"){
					return "是";
				}else{
					return "否"
				}
			}
		},{
			header:"土建费用",
			dataIndex:"civilCost",
			sortable: true,
			align:"center"
		},{
			header:"土建施工单位",
			dataIndex:"civilBuildUnit",
			align:"center"
		},{
			header:"美化体类型",
			dataIndex:"bodyCareType",
			align:"center"
		},{
			header:"美化体施工单位",
			dataIndex:"bodyCareFactory",
			align:"center"
		},{
			header:"美化体费用",
			dataIndex:"bodyCareCost",
			sortable: true,
			align:"center"
		},{
			header:"传输是否新建",
			dataIndex:"newTransfer",
			align:"center",
			renderer:function(value,cell,record,rowIndex,columnIndex,store){
				if(value=="true"){
					return "是";
				}else{
					return "否"
				}
			}
		},{
			header:"工单号一",
			dataIndex:"workMenuNumberOne",
			sortable: true,
			align:"center"
		},{
			header:"工单号二",
			dataIndex:"workMenuNumberTwo",
			sortable: true,
			align:"center"
		},{
			header:"地址编码",
			dataIndex:"addressCode",
			sortable: true,
			align:"center"
		},{
			header:"投资派工单编号",
			dataIndex:"investDispatchOrder",
			sortable: true,
			align:"center"
		},{
			header:"传输项目名称",
			dataIndex:"transferProjectName",
			align:"center"
		},{
			header:"传输项目编号",
			dataIndex:"transferProjectNumber",
			sortable: true,
			align:"center"
		},{
			header:"传输MIS编号",
			dataIndex:"transferMisNumber",
			sortable: true,
			align:"center"
		},{
			header:"传输项目归属",
			dataIndex:"transferProjectBelong",
			align:"center"
		},{
			header:"传输建设规模",
			dataIndex:"transferBuildScale",
			align:"center"
		},{
			header:"传输费用预算",
			dataIndex:"transferBudget",
			sortable: true,
			align:"center"
		},{
			header:"传输开工申请-甲供材料",
			dataIndex:"transferOwnerMaterial",
			align:"center",
			width:140
		},{	
			header:"开工申请-甲供材料",
			dataIndex:"transferMaterial",
			align:"center",
			width:130
		},{
			header:"所有甲供材料费用",
			dataIndex:"allTransferMaterialCost",
			sortable: true,
			align:"center",
			width:130
		},{
			header:"有线管线项目编号",
			dataIndex:"wirePileLineNumber",
			sortable: true,
			align:"center",
			width:130
		},{
			header:"有线设备项目编号",
			dataIndex:"wireDeviceNumber",
			sortable: true,
			align:"center",
			width:130
		},{
			header:"有线管线MIS号",
			dataIndex:"wireLineMisCode",
			sortable: true,
			align:"center"
		},{
			header:"有线设备MIS号",
			dataIndex:"wireDeviceMisCode",
			sortable: true,
			align:"center"
		},{
			header:"甲供材料费用",
			dataIndex:"transferMaterialCost",
			sortable: true,
			align:"center"
		},{
			header:"覆盖延伸施工费用",
			dataIndex:"fgysBuildConst",
			sortable: true,
			align:"center",
			width:130
		},{
			header:"覆盖延伸预算总金额",
			dataIndex:"fgysBudgetTotal",
			sortable: true,
			align:"center",
			width:130
		},{
			header:"覆盖延伸社工单位",
			dataIndex:"fgysBuildUnit",
			align:"center",
			width:120
		},{
			header:"项目完成时间",
			dataIndex:"itemFinishedTime",
			align:"center",
			sortable: true
		},{
			header:"设计人员",
			dataIndex:"transferDesigner",
			align:"center"
		},{
			header:"传输施工单位",
			dataIndex:"transferConstructionUnit",
			align:"center"
		},{
			header:"监理单位",
			dataIndex:"transferSupervisorUnit",
			align:"center"
		},{
			header:"传输开工时间",
			dataIndex:"transferStartDate",
			align:"center",
			sortable: true
		},{
			header:"传输预计竣工时间",
			dataIndex:"transferPlanCompleteDate",
			sortable: true,
			align:"center",
			width:130
		},{
			header:"传输开工申请时间",
			dataIndex:"transferStartApplyDate",
			sortable: true,
			align:"center",
			width:130
		},{
			header:"传输备注",
			dataIndex:"transferRemark",
			align:"center"
		},{
			header:"投资归属",
			dataIndex:"investBelong",
			align:"center"
		},{
			header:"土建投资归属",
			dataIndex:"civilInvestBelong",
			align:"center"
		},{
			header:"美化体投资归属",
			dataIndex:"bodycareInvestBelong",
			align:"center"
		},{
			header:"覆盖延伸投资归属",
			dataIndex:"fgysInvestBelong",
			align:"center",
			width:130
		},{
			header:"直放站投资归属",
			dataIndex:"repeaterInvestBelong",
			align:"center"
		},{
			header:"成本归属",
			dataIndex:"costBelong",
			align:"center"
		},{
			header:"批复日期",
			dataIndex:"replyDate",
			sortable: true,
			align:"center"
		},{
			header:"覆盖延伸MIS任务号",
			dataIndex:"fgysMisCode",
			align:"center",
			width:130
		},{
			header:"直放站MIS任务号",
			dataIndex:"repeaterMisCode",
			align:"center",
			width:130
		},{
			header:"动力配套MIS任务号",
			dataIndex:"horsePowerMisCode",
			align:"center",
			width:130
		}
	],
	viewConfig: {
		forceFit: false
	},
	bbar: new Ext.PagingToolbar({
		store: gridStore,
		pageSize: 20,
		displayInfo: true,
		emptyMsg: "没有相关记录！",
		displayMsg: "当前显示第 {0} ~ {1} 条记录，总计 {2} 条记录"
	}),
	tbar: ["-",{
			text:'导出Excel',
			iconCls:'xls',
			menu:fgysMenu,
			handler:function(){
				var j=fgysMenu.items.getCount();
			    for(var i=2;i<j;i++){
				  fgysMenu.items.itemAt(i).disable();
			    }
			}
		},"-",{
			text:'组合查询',
			iconCls:'detail',
			menu:searchMenu,
			handler:function(){
				var j=searchMenu.items.getCount();
				for(var i=2;i<j;i++){
					searchMenu.items.itemAt(i).disable();
				}
			}
		},"-",{
			id:'h-fgys-areaid',
			xtype:'combo',
			mode:'local',
			displayField:'selectDisplay',
			valueField:'selectItem',
			readOnly:true,
			triggerAction:'all',
			store:new Ext.data.SimpleStore({
				fields:['selectItem','selectDisplay'],
				data:[
						['2','西湖'],
						['3','江干'],
						['4','武林'],
						['5','拱墅'],
						['6','滨江'],
						['7','下沙'],
						['8','余杭'],
						['9','富阳'],
						['10','萧山'],
						['11','桐庐'],
						['12','建德'],
						['13','淳安'],
						['14','临安']
					]
			}),
			listeners:{
				select : function(){
					grid.getStore().baseParams ={'rpt.areaId':this.value};
					grid.getStore().load({params:{start: 0, limit: 20}});
				},
				change:function(){
					//this.reset();
				}
			},
			emptyText:'请选择所属区域...'
		},"-",{
	    	id:'h-fgys-xiangmu',
			xtype:'combo',
			mode:'local',
			displayField:'selectDisplay',
			valueField:'selectItem',
			readOnly:true,
			triggerAction:'all',
			store:new Ext.data.SimpleStore({
				fields:['selectItem','selectDisplay'],
				data:[
						['bizNumber','项目编号'],
						['name','项目名称'],
						['siteName','站点名称']
					]
			}),
			emptyText:'请选择查询类别...'
		},
		"-",
		{
			xtype: "textfield",
			id: "content"
		},
		"-",
		{
			id:'search-btn',
			text: "查询", 
			handler: function() {
				var selectValue=Ext.getCmp('h-fgys-xiangmu').getValue();
				var tf=Ext.getCmp('content'); 
				if(selectValue == "name"){
					grid.getStore().baseParams ={'rpt.name':tf.getValue()};
				}else if(selectValue == "bizNumber"){ 
					grid.getStore().baseParams ={'rpt.bizNumber':tf.getValue()};
				/*}else if(selectValue == "siteNumber"){
					grid.getStore().baseParams ={'rpt.siteNumber':tf.getValue()};*/
				}else if(selectValue == "siteName"){
					grid.getStore().baseParams ={'rpt.siteName':tf.getValue()};
				}
			    grid.getStore().load({params:{start: 0, limit: 20}});
			}
		},"-"
	],
	listeners:{
		rowdblclick:function(){
			var record=grid.getSelectionModel().getSelected();
			var id=record.get('id');
			var name=record.get('name');
			var fgysWin = new Ext.Window({
				title:'详细信息--'+name,
				width:800,
				height:400,
				autoScroll: true,
				resizable:true,
				maximized:true,
				autoLoad:"../room/roomProject!view.action?id=" +id
			});
			fgysWin.show();
		},
		keypress:function(){
			/*var selectValue=Ext.getCmp('h-fgys-xiangmu').getValue();
			var tf=Ext.getCmp('content'); 
			if(selectValue == "name"){
				grid.getStore().baseParams ={'rpt.name':tf.getValue()};
			}else if(selectValue == "bizNumber"){ 
				grid.getStore().baseParams ={'rpt.bizNumber':tf.getValue()};
			}else if(selectValue == "siteNumber"){
				grid.getStore().baseParams ={'rpt.siteNumber':tf.getValue()};
			}else if(selectValue == "siteName"){
				grid.getStore().baseParams ={'rpt.siteName':tf.getValue()};
			}
		    grid.getStore().load({params:{start: 0, limit: 20}});*/
		}
	}
});
Ext.QuickTips.init();
Ext.onReady(function() {
	
	gridStore.load({params: {start: 0, limit: 20}});
	new Ext.Viewport({
		layout: "border",
		border: false,
		items: [grid]
	});
	Ext.get('content').on('keypress',function(e){
		  if (e.getKey() == e.ENTER && this.getValue().length > 0) { 
                    alert("OK"); 
          } 
	});
});